package com.atguigu.netty.group.chat;

import com.atguigu.netty.group.chat.model.MsgDTO;

/**
 * @Title:
 * @Description: 消息封装
 * @author: huaguoguo
 * @Date： 2021/3/21 22:27
 */
public class Message {

    public static String buildMsg(MsgDTO msgDTO) {
        return String.format("【%s】：%s", msgDTO.getUserName(),msgDTO.getMsg());
    }

    public static void clientMsg(MsgDTO msgDTO) {
        System.out.println(buildMsg(msgDTO));
    }
}
